﻿using System.Security.Cryptography.X509Certificates;
using System;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using System.Collections.Generic;

namespace AssetManageSystem.Model.AssetManage
{
    /// <summary>
    /// 资产借用
    /// </summary>
    public class AssetBorrow : PersistPoco
    {
        [Display(Name = "单据编号")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string DocNumber { get; set; }

        [Display(Name = "借用人")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string Name { get; set; }

        [Display(Name = "借用单位")]
        public string Unit { get; set; }

        [Display(Name = "联系方式")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string Contacts { get; set; }

        [Display(Name = "借用日期")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public DateTime? OutDate { get; set; }

        [Display(Name = "归还日期")]
        public DateTime? ReturnDate { get; set; }

        public List<AssetInfo> AssetInfos { get; set; }

        [Display(Name = "资产ID")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? AssetId { get; set; }
        public AssetInfo Asset { get; set; }

        //public List<AssetBorrowMiddleTable> AssetId { get; set; }

    }
}
